package com.hulk.dryad.manage.security.component;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;

/**
 * @author hulk
 * @date 2019/4/13
 * <p>
 * 资源服务器对外直接暴露URL,如果设置contex-path 要特殊处理
 */
@Setter
@Getter
@Component
@ConditionalOnExpression("(!'${security.ignoring}'.isEmpty()) || (!'${security.permitAll}'.isEmpty())")
@ConfigurationProperties(prefix = PermitAllSecurityUrlProperties.PREFIX)
public class PermitAllSecurityUrlProperties  {

	static final String PREFIX = "security";

    //WebSecurity 静态资源过滤
	private List<String> ignoring = new ArrayList<>();
    //HttpSecurity 授权访问过滤
	private  List<String> permitAll = new ArrayList<>();





}
